<template>
  <!-- tablecommon -->
  <div class="commonBoxmp white-bg">
    <div class="aic jca">
      <el-button type="primary" @click="handleCookie1"
        >设置名为foo的cookie</el-button
      >
      <el-button type="primary" @click="handleCookie2"
        >设置名为name的cookie 有效期1天</el-button
      >
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref, reactive, onMounted } from "vue";
import { useRouter, useRoute } from "vue-router";
import vueQr from "vue-qr/src/packages/vue-qr.vue";
const router = useRouter();
const route = useRoute();
import Cookies from "js-cookie";

//
onMounted(() => {});
const handleCookie1 = () => {
  Cookies.set("foo", "bar");
};
const handleCookie2 = () => {
  Cookies.set("name", "value", { expires: 1 });
};
/*
基本数据类型
引用数据类型（复杂类型） 个人建议 ref初始化变量 
ref 和 reactive 本质我们可以简单的理解为ref是对reactive的二次包装, 
ref定义的数据访问的时候要多一个.value
*/
const count = ref(0);
const state = reactive({});
</script>

<style scoped lang="scss"></style>
